<?php

class Giftbox extends BaseGiftbox
{
	
public function __toString() {
		return $this->getName();
	}

        protected function doSave(PropelPDO $con)
	{
            ///Устанавливаем id партнера
            $user = sfGuardUserPeer::retrieveByPK($this->to_id);
            if($user->getPartnerId()>0)
                {
                    $this->setPartnerId($user->getPartnerId());
                }
            parent::doSave($con);

        }
	
}
